from django.shortcuts import render

from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import serializers, viewsets
from api import models


class UserView(APIView):
    def get(self, request, *args, **kwargs):
        return Response('666')


class GroupModelSerializer(serializers.ModelSerializer):
    class Meta:
        model = models.Group
        fields = "__all__"


class GroupViewSet(viewsets.ModelViewSet):
    queryset = models.Group.objects.all()
    serializer_class = GroupModelSerializer
